<template>
  <div>
    <Chart :cdata="cdata" />
  </div>
</template>

<script>
import Chart from './chart.vue';
export default {
  data () {
    return {
      cdata: {
        xData: [],
        seriesData: []
      }
    }
  },
  components: {
    Chart,
  },
  mounted () {
  },
  methods: {
  },
  props: {
    info: {
      type: Object
    }
  },
  watch: {
    info: {
      handler (newVal) {
        if (newVal) {
          this.cdata = {
            xData: ["本科", "初中","大专", "高中","研究生"],
            seriesData: [
              { value: newVal.benke, name: "本科" },
              { value: newVal.chuzhong, name: "初中" },
              { value: newVal.dazhuan, name: "大专" },
              { value: newVal.gaozhong, name: "高中" },
              { value: newVal.yanjiusheng, name: "研究生" },
            ]
          }
        }
      },
      immediate: true,
      deep: true
    }
  }
}
</script>

<style lang="scss" scoped>
</style>